package BehavioralPattern.Observer.jdk;

import java.util.Observable;
import java.util.Observer;

/**
 * @Classname : ConcreteObserver
 * @Description : 具体观察者类
 * @Author : chentianyu
 * @Date 2023/3/4 23:36
 */


public class ConcreteObserver implements Observer {

    private String name;

    public ConcreteObserver(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(this.name + "：搬起小板凳开始收听今天的广播节目——" + arg);
    }
}
